package com.xq.model.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.xq.model.entity.TBaseSurfMin;

import java.io.IOException;
import java.net.URISyntaxException;
import java.util.List;

/**
 * 中国地面分钟要素 服务类
 *
 * @author xu
 * 2021/8/20 10:48
 */
public interface ITBaseSurfMinService extends IService<TBaseSurfMin> {

    /**
     * 根据时间搜索
     * @param times 示例20210820000000
     * @throws IllegalAccessException
     */
    void searchSurf(String times) throws IllegalAccessException, IOException, URISyntaxException;

    /**
     * 按时间以及国内行政编码搜索
     * @param times  示例20210820000000
     * @param adminCodes 520100
     */
    void searchSurfByRegion(String times,String adminCodes) throws IllegalAccessException, IOException, URISyntaxException;

    /**
     * 发送地面分钟要素至云端
     * @param surfMinList 未解析过得地面分钟要素
     */
    void postSurfMin(List<TBaseSurfMin> surfMinList) throws IOException;


    /**
     * 发送超时的地面分钟要素至云端
     * @param surfMinList 未解析过得地面分钟要素
     */
    void postOverSurfMin(List<TBaseSurfMin> surfMinList) throws IOException;


    /**
     * 设置访问故障的要素 即超时或者未报
     * type 2-缺报 3-超时
     * @param surfMinList
     */
    void badSurf(List<TBaseSurfMin> surfMinList,String type) throws IOException;

    /**
     * 再次请求还没上传的数据
     * 注意超过n个小时的已不再请求
     */
    void againGetSurf(int nHour) throws IllegalAccessException, IOException, URISyntaxException;
}
